<template>
  <div>
    <div class="wrap">
      <div class="orderKindsWrap">
        <div class="kindsTitle">
          <img src="@/assets/warning.png" alt="" class="waringImg" />
          <em class="watting">{{
            resWalletFetchGetInfo.status == 0 ? "待结算" : "已结算"
          }}</em>
        </div>
      </div>
      <div class="infoList" v-if="resWalletFetchGetInfo.status==1">
        <div class="lineWrap">
          <div class="leftLine">结算凭证</div>
          <div class="rightLine">{{resWalletFetchGetInfo.updateTime}}</div>
        </div>
        <div class="imgList" v-if="resWalletFetchGetInfo.evidenceImgUrl&&resWalletFetchGetInfo.evidenceImgUrl.length>0">
          <img :src="$imgUrl+item" uralt="" class="imgItem" v-for="(item,index) in resWalletFetchGetInfo.evidenceImgUrl" :key="index"/>
        </div>
      </div>
      <div class="infoList infoList2">
        <div class="lineWrap">
          <div class="leftLine">实际到账</div>
          <div class="rightLine">
            <p style="text-align: right">
              {{ resWalletFetchGetInfo.finishPrice || "待审核结算" }}
            </p>
            <p class="extratLine">
              技术服务费{{ resWalletFetchGetInfo.tecServerRatio }}%：¥{{
                resWalletFetchGetInfo.practicalPrice * 0.01
              }}
              &nbsp;&nbsp;&nbsp;&nbsp;申请提现：¥{{ resWalletFetchGetInfo.fetchPrice }}
            </p>
          </div>
        </div>
        <div class="lineWrap">
          <div class="leftLine">提现至</div>
          <div class="rightLine">
            {{ resWalletFetchGetInfo.bankName }}（{{
              resWalletFetchGetInfo.bankCardNum
            }}）
          </div>
        </div>
        <div class="lineWrap">
          <div class="leftLine">申请时间</div>
          <div class="rightLine">
            {{
              resWalletFetchGetInfo.finishTime
                ? resWalletFetchGetInfo.finishTime
                : resWalletFetchGetInfo.createTime
            }}
          </div>
        </div>
        <div class="lineWrap">
          <div class="leftLine">提现单号</div>
          <div class="rightLine">{{ resWalletFetchGetInfo.orderNum }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { apiWalletFetchGetInfo } from "@/request/api"; // api接口
export default {
  name: "App",
  data() {
    return {
      id: this.$route.query.id,
      resWalletFetchGetInfo: "",
    };
  },
  mounted() {
    this.getWalletFetchGetInfo();
  },
  methods: {
    //查询提现记录:
    getWalletFetchGetInfo() {
      apiWalletFetchGetInfo({
        id: this.id,
      }).then((res) => {
        this.resWalletFetchGetInfo = res.data;
        if(this.resWalletFetchGetInfo.evidenceImgUrl){
            this.resWalletFetchGetInfo.evidenceImgUrl = this.resWalletFetchGetInfo.evidenceImgUrl.split(",");
        }
        console.log("resWalletFetchGetInfo-提现记录", this.resWalletFetchGetInfo);
      });
    },
  },
  created() {},
  components: {},
};
</script>

<style scoped>
.wrap {
  background: #f2f4fa;
  padding: 15px;
  min-height: calc(100vh - 70px);
}
.orderKindsWrap {
  width: calc(100% - 44px);
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 22px;
  margin-bottom: 20px;
}

.kindsTitle {
  font-size: 16px;
  font-weight: bold;
  color: #f9a31f;
  display: flex;
  justify-content: center;
}
.watting {
  /* padding-bottom: 10px; */
  align-items: center;
  display: inline-block;
  margin-top: 8px;
}
.waringImg {
  width: 45px;
  height: 45px;
}
.loginIn {
  color: #f48f5b;
}
.infoList {
  overflow: hidden;
  width: calc(100% - 30px);
  background: #ffffff;
  border-radius: 20px;
  padding: 15px 15px 5px 15px;
  margin-bottom: 20px;
}
.left {
  float: left;
}
.infoItem {
  height: 20px;
  line-height: 20px;
  display: flex;
  margin-bottom: 15px;
}
.infoItem img {
  width: 17px;
  height: auto;
  align-items: center;
  padding-right: 15.5px;
}
.infoItem em {
  font-size: 14px;
  font-weight: 400;
  color: #000000;
}
.rightArrow {
  float: right;
  width: 5px;
  height: 9px;
  margin-top: 40px;
}

.lineWrap {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}
.leftLine {
  font-size: 14px;
  font-weight: 600;
  color: #010101;
}
.rightLine {
  font-size: 14px;
  font-weight: 300;
  color: #010101;
}
.extratLine {
  color: #aeafb1;
  font-size: 10px;
  padding-top: 3px;
}
.imgList {
  width: 100%;
}
.imgItem {
  width: 30%;
  float: left;
  margin-right: 2%;
  border-radius: 15px;
  margin-bottom: 10px;
}
</style>
